package com.diploma.project.aiqiyi.model;

import lombok.Builder;
import lombok.Data;
import lombok.experimental.Tolerate;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Table(name = "t_video")
@Data
@Builder
public class Video {
    @Id
    private Integer id;

    /**
     * 标题
     */
    private String title;

    /**
     * 描述
     */
    private String description;

    /**
     * 类别{1：功课，2：音乐，3：舞蹈，4：运动，5：摄影，6：健身，7：游戏}
     */
    private Integer category;

    /**
     * 标签，用英文逗号隔开
     */
    private String tag;

    /**
     * 视频路径
     */
    private String url;

    /**
     * 预览图路径
     */
    @Column(name = "preview_img")
    private String previewImg;

    /**
     * 状态: {0: 普通, 1: 付费}
     */
    private Byte type;

    /**
     * 视频价格
     */
    private BigDecimal price;

    /**
     * 时长
     */
    private Integer duration;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    @Tolerate
    public Video() {
    }
}